package com.persistencia.domain;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the detalleevento database table.
 * 
 */
@Embeddable
public class DetalleeventoPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(insertable=false, updatable=false)
	private int codigoEvento;

	@Column(insertable=false, updatable=false)
	private int codigoLugar;

	public DetalleeventoPK() {
	}
	public int getCodigoEvento() {
		return this.codigoEvento;
	}
	public void setCodigoEvento(int codigoEvento) {
		this.codigoEvento = codigoEvento;
	}
	public int getCodigoLugar() {
		return this.codigoLugar;
	}
	public void setCodigoLugar(int codigoLugar) {
		this.codigoLugar = codigoLugar;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof DetalleeventoPK)) {
			return false;
		}
		DetalleeventoPK castOther = (DetalleeventoPK)other;
		return 
			(this.codigoEvento == castOther.codigoEvento)
			&& (this.codigoLugar == castOther.codigoLugar);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.codigoEvento;
		hash = hash * prime + this.codigoLugar;
		
		return hash;
	}
}